package com.example.springboot003mysql;

import com.baomidou.mybatisplus.autoconfigure.ConfigurationCustomizer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class SqlLogInterceptorConfig {
    @Bean
    public SqlLogInterceptor sqlLogInterceptorX() {
        return new SqlLogInterceptor();
    }

    @Bean
    public ConfigurationCustomizer configurationCustomizerX(SqlLogInterceptor sqlLogInterceptorX) {
        return configuration -> configuration.addInterceptor(sqlLogInterceptorX);
    }
}
